.PHONY : all run plot doc test doxygen testIntpConds testPoly testTriTab testNewtonIntp clean 
all :	
	make plot
	make doc

run :	
	g++ -o Assignment.o Assignment.cpp
	./Assignment.o

plot :
	make run
	matlab -nodesktop -nosplash -noFigureWindows < AssignmentB.m
	@echo AssignmentB.png has been generated.
	matlab -nodesktop -nosplash -noFigureWindows < AssignmentC.m
	@echo AssignmentC.png has been generated.
	matlab -nodesktop -nosplash -noFigureWindows < AssignmentE.m
	@echo AssignmentE1,E2.png have been generated.

doc :
	xelatex doc.tex
	xelatex doc.tex

doxygen :
	doxygen Doxygen_prefer.cfg

test :
	make testIntpConds
	make testPoly
	make testTriTab
	make testNewtonIntep

testIntepConds :
	g++ -o testIntpConds.o testIntpConds.cpp
	./testIntpConds.o

testPoly :
	g++ -o testPoly.o testPoly.cpp
	./testPoly.o

testTriTab :
	g++ -o testTriTab.o testTriTab.cpp
	./testTriTab.o

testNewtonIntep :
	g++ -o testNewtonIntp.o testNewtonIntp.cpp
	./testNewtonIntp.o

clean :
	-rm *.m *.o *.aux *.log *.pdf *.png